package com.mark.spring.annotation.register.condition;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

import java.util.Date;

/**
 * @Description: 用户头像POJO类
 * @Author: Mark
 * @CreateDate: 2019/5/29 23:11
 * @Version: 2.0
 * @Copyright : 豆浆油条个人非正式工作室
 */
@Configuration
public class ConditionConfig {

    @Bean
    @Conditional({GZCondition.class})
    public Weather weather(){
        Weather weather = new Weather();
        weather.setCity("GZ");
        weather.setWeather("rain");
        weather.setDate(new Date());
        return weather;
    }

}
